﻿/// <reference path="../Framework/BrowserApi.js" />
/// <reference path="../Framework/Toolbar/Toolbar.css" />
/// <reference path="Content.js" />
/// <reference path="Global.js" />
/// <reference path="MouseAndKeyboardEvents.js" />
/// <reference path="SelectionProcessing.js" />
/// <reference path="VirtualScrolling.js" />


var ToolbarElements =
        {
            IconsPath: "../../../Motion/User Interface/Framework/Toolbar/Icons/",
            GraphicsPath: "../../../Motion/User Interface/Framework/Toolbar/Graphics/",
            Tabs:
            {
                "Home": // Tab Name
                {

                "File":
                    {
                        "Save":
                        {
                            Type: "LargeSplitButton",
                            Icon: "SaveLarge.png",
                            MenuItems:
                            {
                                "Save":
                                {
                                    Icon: "Save.png",
                                    Action: 'Spreadsheet.SaveEventHandler'
                                },
                                "Save as ...":
                                {
                                    Icon: "SaveAs.png",
                                    Action: 'Spreadsheet.SaveAsEventHandler'
                                }
                            }
                        },
                        "New":
                        {
                            Type: "SmallButton",
                            Icon: "New.png",
                            Action: 'Spreadsheet.NewEventHandler'
                        },
                        "Open":
                        {
                            Type: "SmallButton",
                            Icon: "Open.png",
                            Action: 'Spreadsheet.OpenEventHandler'
                        }
                    },

                "Clipboard": // Group Name
                    {
                    "Paste":
                        {
                            Type: "LargeSplitButton",
                            Icon: "PasteLarge.png",
                            MenuItems:
                            {
                                "Paste":
                                {
                                    Icon: "Paste.png"
                                },
                                "Paste Special":
                                {
                                    Icon: "PasteSpecial.png"
                                }
                            }
                        },
                    "Cut":
                        {
                            Type: "SmallButton",
                            Icon: "Cut.png",
                            Action: 'Spreadsheet.CutEventHandler'
                        },
                    "Copy":
                        {
                            Type: "SmallButton",
                            Icon: "Copy.png",
                            Action: 'Spreadsheet.CopyEventHandler'
                        }
                }
            },
            "Other":
                {
                    "Other":
                    {
                        "Test":
                        {
                            Type: "LargeSplitButton",
                            Icon: "PasteLarge.png"
                        }
                    }
                }
        }
    };


// Initialize the toolbar after the page is loaded.

function InitializeToolbar()
{
    window.removeEventListener('load', InitializeToolbar, false);

    var ToolbarPlaceHolder = document.getElementById('ToolbarPlaceHolder')
    Toolbar.Create(ToolbarPlaceHolder, ToolbarElements);
}

window.addEventListener('load', InitializeToolbar, false);